<?php

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Cmspage
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */

class Cmspage_Form_Custom_Fields extends Fields_Form_Standard {
	public $_error = array ();
	
	public function init() {
		// custom cmspage fields
		if (! $this->_item) {
			$cmspage_item = new Cmspage_Model_Cmspage ( array () );
			$this->setItem ( $cmspage_item );
		}
		parent::init ();
		
		$this->removeElement ( 'submit' );
	}
	
	public function loadDefaultDecorators() {
		if ($this->loadDefaultDecoratorsIsDisabled ()) {
			return;
		}
		
		$decorators = $this->getDecorators ();
		if (empty ( $decorators )) {
			$this->addDecorator ( 'FormElements' ); //->addDecorator($decorator);
		}
	}
}